@redvars/peacock 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/dist/{BaseField-CAog9TIc.js → BaseField-BMumJpkW.js} +6 -3
  2. package/dist/BaseField-BMumJpkW.js.map +1 -0
  3. package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-mWdyYv27.js} +6 -3
  4. package/dist/BaseInput-mWdyYv27.js.map +1 -0
  5. package/dist/accordion.js.map +1 -1
  6. package/dist/ai-badge.js +2 -2
  7. package/dist/ai-summary.js +2 -2
  8. package/dist/alert.js +2 -2
  9. package/dist/anchor-nav.js +2 -2
  10. package/dist/app-shell.js +2 -2
  11. package/dist/assistant-panel.js +2 -2
  12. package/dist/assistant-step.js +2 -2
  13. package/dist/assistant-steps.js +2 -2
  14. package/dist/avatar-group.js +2 -2
  15. package/dist/banner.js +2 -2
  16. package/dist/{base-button-Do2TUy8M.js → base-button-BJMGMcMv.js} +3 -1
  17. package/dist/base-button-BJMGMcMv.js.map +1 -0
  18. package/dist/{base-progress-BiLlZVHJ.js → base-progress-CvLVSjuy.js} +4 -2
  19. package/dist/base-progress-CvLVSjuy.js.map +1 -0
  20. package/dist/bottom-sheet.js +2 -2
  21. package/dist/breadcrumb.js +2 -2
  22. package/dist/button-group.js +4 -4
  23. package/dist/button.js +3 -3
  24. package/dist/calendar.js +2 -2
  25. package/dist/canvas-base-BTQMEVn_.js +788 -0
  26. package/dist/canvas-base-BTQMEVn_.js.map +1 -0
  27. package/dist/canvas-link-CtgsALq4.js +54 -0
  28. package/dist/canvas-link-CtgsALq4.js.map +1 -0
  29. package/dist/{cartesian-chart-C-f1frt0.js → cartesian-chart-DM1FC_XT.js} +3 -2
  30. package/dist/cartesian-chart-DM1FC_XT.js.map +1 -0
  31. package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-B6fa4Lll.js} +2 -2
  32. package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-B6fa4Lll.js.map} +1 -1
  33. package/dist/cb-group.js +3 -3
  34. package/dist/cb-rule.js +3 -3
  35. package/dist/chart-area.js +5 -4
  36. package/dist/chart-area.js.map +1 -1
  37. package/dist/chart-bar.js +5 -4
  38. package/dist/chart-bar.js.map +1 -1
  39. package/dist/chart-base-Dhxuw_Mw.js +833 -0
  40. package/dist/chart-base-Dhxuw_Mw.js.map +1 -0
  41. package/dist/chart-doughnut.js +4 -3
  42. package/dist/chart-doughnut.js.map +1 -1
  43. package/dist/chart-line.js +5 -4
  44. package/dist/chart-line.js.map +1 -1
  45. package/dist/chart-pie.js +4 -3
  46. package/dist/chart-pie.js.map +1 -1
  47. package/dist/chat-message.js +2 -2
  48. package/dist/chat-thread.js +2 -2
  49. package/dist/checkbox-group.js +4 -4
  50. package/dist/checkbox.js +4 -4
  51. package/dist/chip-set.js +3 -3
  52. package/dist/chip.js +4 -4
  53. package/dist/circular-progress.js +3 -3
  54. package/dist/citation.js +2 -2
  55. package/dist/code-editor.js +5 -4
  56. package/dist/code-editor.js.map +1 -1
  57. package/dist/code-highlighter.js +2 -2
  58. package/dist/color-field.js +5 -5
  59. package/dist/color-picker.js +2 -2
  60. package/dist/command-palette.js +2 -2
  61. package/dist/comment-composer.js +5 -5
  62. package/dist/condition-builder.js +3 -3
  63. package/dist/confirm-dialog.js +2 -2
  64. package/dist/copy-button.js +2 -2
  65. package/dist/currency-field.js +5 -5
  66. package/dist/custom-elements-jsdocs.json +2115 -336
  67. package/dist/custom-elements.json +19483 -615
  68. package/dist/date-field.js +6 -6
  69. package/dist/date-picker.js +4 -2
  70. package/dist/date-picker.js.map +1 -1
  71. package/dist/date-range-field.js +6 -6
  72. package/dist/datetime-field.js +6 -6
  73. package/dist/dependency-map-layout-5KUueabk.js +1390 -0
  74. package/dist/dependency-map-layout-5KUueabk.js.map +1 -0
  75. package/dist/dependency-map.js +1605 -0
  76. package/dist/dependency-map.js.map +1 -0
  77. package/dist/description-item.js +2 -2
  78. package/dist/description-list.js +2 -2
  79. package/dist/diagram-2r11KySs.js +2029 -0
  80. package/dist/diagram-2r11KySs.js.map +1 -0
  81. package/dist/diagram-controls.js +345 -0
  82. package/dist/diagram-controls.js.map +1 -0
  83. package/dist/diagram-minimap.js +216 -0
  84. package/dist/diagram-minimap.js.map +1 -0
  85. package/dist/diagram.js +20 -0
  86. package/dist/diagram.js.map +1 -0
  87. package/dist/diff-viewer.js +2 -2
  88. package/dist/discussion-activity.js +2 -2
  89. package/dist/discussion-comment.js +2 -2
  90. package/dist/discussion.js +5 -5
  91. package/dist/{document-editor-BO7QPbO5.js → document-editor-BnEugM3E.js} +2 -2
  92. package/dist/{document-editor-BO7QPbO5.js.map → document-editor-BnEugM3E.js.map} +1 -1
  93. package/dist/document-editor.js +3 -3
  94. package/dist/draft-card.js +2 -2
  95. package/dist/erd.js +2021 -0
  96. package/dist/erd.js.map +1 -0
  97. package/dist/fab.js +4 -4
  98. package/dist/field.js +257 -43
  99. package/dist/field.js.map +1 -1
  100. package/dist/file-upload.js +37 -15
  101. package/dist/file-upload.js.map +1 -1
  102. package/dist/filter-bar.js +2 -2
  103. package/dist/flow.js +27 -970
  104. package/dist/flow.js.map +1 -1
  105. package/dist/focus-ring.js +2 -0
  106. package/dist/focus-ring.js.map +1 -1
  107. package/dist/{form-associated-D3Tn33s_.js → form-associated-BHbg72PG.js} +3 -1
  108. package/dist/{form-associated-D3Tn33s_.js.map → form-associated-BHbg72PG.js.map} +1 -1
  109. package/dist/{form-submitter-DWwv6K9-.js → form-submitter-beG1CXAn.js} +7 -1
  110. package/dist/{form-submitter-DWwv6K9-.js.map → form-submitter-beG1CXAn.js.map} +1 -1
  111. package/dist/form.js +2 -2
  112. package/dist/{generative-view-DmtpDobn.js → generative-view-BgOcLRXr.js} +13 -13
  113. package/dist/generative-view-BgOcLRXr.js.map +1 -0
  114. package/dist/generative-view.js +3 -3
  115. package/dist/geometry-INg82Lxq.js +305 -0
  116. package/dist/geometry-INg82Lxq.js.map +1 -0
  117. package/dist/history-YbTSQZHj.js +45 -0
  118. package/dist/history-YbTSQZHj.js.map +1 -0
  119. package/dist/host-CZK7xhzh.js +40 -0
  120. package/dist/host-CZK7xhzh.js.map +1 -0
  121. package/dist/html-editor.js +5 -5
  122. package/dist/{hyperlink-DhE9RlVS.js → hyperlink-DycWPKwU.js} +10 -1
  123. package/dist/hyperlink-DycWPKwU.js.map +1 -0
  124. package/dist/{i18n-controller-urcQKYGe.js → i18n-controller-Cp43HjJl.js} +2 -2
  125. package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-Cp43HjJl.js.map} +1 -1
  126. package/dist/icon-button.js +4 -4
  127. package/dist/image.js +2 -2
  128. package/dist/index.js +37 -18
  129. package/dist/index.js.map +1 -1
  130. package/dist/inline-edit.js +2 -2
  131. package/dist/input.js +4 -4
  132. package/dist/json-viewer.js +2 -2
  133. package/dist/kanban.js +2 -2
  134. package/dist/kbd.js +2 -2
  135. package/dist/linear-progress.js +3 -3
  136. package/dist/link-button.js +2 -2
  137. package/dist/list-item.js +2 -2
  138. package/dist/list.js +2 -2
  139. package/dist/listbox.js +3 -3
  140. package/dist/loader-full.js +13 -13
  141. package/dist/loader.js +44 -15
  142. package/dist/loader.js.map +1 -1
  143. package/dist/markdown-editor.js +5 -5
  144. package/dist/markers-BFmh1OCz.js +46 -0
  145. package/dist/markers-BFmh1OCz.js.map +1 -0
  146. package/dist/measure-controller-Dmc5hZKg.js +89 -0
  147. package/dist/measure-controller-Dmc5hZKg.js.map +1 -0
  148. package/dist/mention-input.js +6 -5
  149. package/dist/mention-input.js.map +1 -1
  150. package/dist/menu-item.js +3 -2
  151. package/dist/menu-item.js.map +1 -1
  152. package/dist/menu.js +2 -2
  153. package/dist/modal.js +2 -2
  154. package/dist/navigation-bar.js +2 -2
  155. package/dist/navigation-drawer.js +2 -2
  156. package/dist/navigation-rail.js +2 -2
  157. package/dist/notification-center.js +2 -2
  158. package/dist/number-field.js +6 -5
  159. package/dist/number-field.js.map +1 -1
  160. package/dist/option.js +2 -2
  161. package/dist/page-header.js +2 -2
  162. package/dist/pagination.js +2 -2
  163. package/dist/password-field.js +5 -5
  164. package/dist/password-rules.js +2 -2
  165. package/dist/phone-field.js +5 -5
  166. package/dist/{picker-field-B4DtcJfL.js → picker-field-dTlIMAQn.js} +3 -3
  167. package/dist/{picker-field-B4DtcJfL.js.map → picker-field-dTlIMAQn.js.map} +1 -1
  168. package/dist/pin-input.js +5 -5
  169. package/dist/presence-indicator.js +2 -2
  170. package/dist/prompt-input.js +5 -5
  171. package/dist/radio-group.js +1 -0
  172. package/dist/radio-group.js.map +1 -1
  173. package/dist/radio.js +5 -5
  174. package/dist/radio.js.map +1 -1
  175. package/dist/rating.js +5 -4
  176. package/dist/rating.js.map +1 -1
  177. package/dist/redvars-loader.js +2 -2
  178. package/dist/relative-time.js +2 -2
  179. package/dist/resizable-panels.js +2 -2
  180. package/dist/{rich-text-input-DLICqof1.js → rich-text-input-DM_BOzgk.js} +3 -3
  181. package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-DM_BOzgk.js.map} +1 -1
  182. package/dist/ripple.js +2 -0
  183. package/dist/ripple.js.map +1 -1
  184. package/dist/{schema-hMt-NRLk.js → schema-B8g30A_n.js} +2 -2
  185. package/dist/{schema-hMt-NRLk.js.map → schema-B8g30A_n.js.map} +1 -1
  186. package/dist/search.js +4 -4
  187. package/dist/segmented-button-group.js +1 -1
  188. package/dist/select.js +7 -7
  189. package/dist/side-sheet.js +2 -2
  190. package/dist/signature-pad.js +5 -4
  191. package/dist/signature-pad.js.map +1 -1
  192. package/dist/slider.js +5 -4
  193. package/dist/slider.js.map +1 -1
  194. package/dist/snackbar.js +2 -2
  195. package/dist/sparkline.js +2 -2
  196. package/dist/split-button.js +2 -2
  197. package/dist/src/__internal/diagram/canvas-base.d.ts +105 -0
  198. package/dist/src/__internal/diagram/canvas-link.d.ts +21 -0
  199. package/dist/src/__internal/diagram/geometry.d.ts +49 -0
  200. package/dist/src/__internal/diagram/history.d.ts +17 -0
  201. package/dist/src/__internal/diagram/host.d.ts +45 -0
  202. package/dist/src/__internal/diagram/markers.d.ts +16 -0
  203. package/dist/src/__internal/diagram/measure-controller.d.ts +32 -0
  204. package/dist/src/__internal/diagram/motion.d.ts +22 -0
  205. package/dist/src/__internal/diagram/selection.d.ts +20 -0
  206. package/dist/src/__internal/diagram/types.d.ts +39 -0
  207. package/dist/src/__internal/diagram/viewport-controller.d.ts +89 -0
  208. package/dist/src/__internal/i18n/strings.d.ts +149 -0
  209. package/dist/src/__internal/toggle-base.d.ts +8 -0
  210. package/dist/src/__internal/utils/deprecate.d.ts +3 -3
  211. package/dist/src/accordion/accordion.d.ts +1 -0
  212. package/dist/src/code-editor/code-editor.d.ts +1 -0
  213. package/dist/src/date-picker/date-picker.d.ts +2 -0
  214. package/dist/src/dependency-map/dependency-map-layout.d.ts +48 -0
  215. package/dist/src/dependency-map/dependency-map.d.ts +241 -0
  216. package/dist/src/dependency-map/index.d.ts +2 -0
  217. package/dist/src/diagram/diagram.d.ts +300 -0
  218. package/dist/src/diagram/flow.d.ts +53 -0
  219. package/dist/src/diagram/index.d.ts +4 -0
  220. package/dist/src/diagram-controls/diagram-controls.d.ts +46 -0
  221. package/dist/src/diagram-controls/index.d.ts +1 -0
  222. package/dist/src/diagram-minimap/diagram-minimap.d.ts +39 -0
  223. package/dist/src/diagram-minimap/index.d.ts +1 -0
  224. package/dist/src/erd/erd-layout.d.ts +27 -0
  225. package/dist/src/erd/erd.d.ts +266 -0
  226. package/dist/src/erd/index.d.ts +2 -0
  227. package/dist/src/field/field.d.ts +38 -1
  228. package/dist/src/file-upload/file-upload.d.ts +3 -1
  229. package/dist/src/focus-ring/focus-ring.d.ts +2 -0
  230. package/dist/src/index.d.ts +15 -2
  231. package/dist/src/input/BaseField.d.ts +3 -0
  232. package/dist/src/input/BaseInput.d.ts +3 -0
  233. package/dist/src/menu/menu-item/menu-item.d.ts +1 -0
  234. package/dist/src/number-field/number-field.d.ts +4 -0
  235. package/dist/src/progress/base-progress.d.ts +3 -0
  236. package/dist/src/radio/radio-group.d.ts +1 -0
  237. package/dist/src/rating/rating.d.ts +1 -0
  238. package/dist/src/ripple/ripple.d.ts +2 -0
  239. package/dist/src/signature-pad/signature-pad.d.ts +1 -0
  240. package/dist/src/slider/slider.d.ts +1 -0
  241. package/dist/src/switch/switch.d.ts +1 -0
  242. package/dist/src/tabs/tab.d.ts +2 -0
  243. package/dist/src/tabs/tabs.d.ts +1 -0
  244. package/dist/src/textarea/textarea.d.ts +1 -0
  245. package/dist/src/time-picker/time-picker.d.ts +2 -0
  246. package/dist/src/transfer-list/transfer-list.d.ts +1 -0
  247. package/dist/src/tree-chart/index.d.ts +2 -0
  248. package/dist/src/tree-chart/tree-chart-layout.d.ts +49 -0
  249. package/dist/src/tree-chart/tree-chart.d.ts +221 -0
  250. package/dist/src/workflow/index.d.ts +2 -0
  251. package/dist/src/workflow/workflow-format.d.ts +5 -0
  252. package/dist/src/workflow/workflow-model.d.ts +194 -0
  253. package/dist/src/workflow/workflow.d.ts +313 -0
  254. package/dist/src/workflow-timeline/index.d.ts +1 -0
  255. package/dist/src/workflow-timeline/workflow-timeline.d.ts +41 -0
  256. package/dist/stat.js +2 -2
  257. package/dist/status-indicator.js +2 -2
  258. package/dist/step.js +2 -2
  259. package/dist/stepper.js +2 -2
  260. package/dist/{strings-DmbqMTfs.js → strings-BJPuhKJk.js} +163 -1
  261. package/dist/{strings-DmbqMTfs.js.map → strings-BJPuhKJk.js.map} +1 -1
  262. package/dist/sub-menu.js +2 -2
  263. package/dist/svg.js +2 -2
  264. package/dist/switch.js +5 -4
  265. package/dist/switch.js.map +1 -1
  266. package/dist/tab.js +1 -0
  267. package/dist/tab.js.map +1 -1
  268. package/dist/table.js +2 -2
  269. package/dist/tabs.js +1 -0
  270. package/dist/tabs.js.map +1 -1
  271. package/dist/test/diagram-controls.test.d.ts +1 -0
  272. package/dist/test/diagram-geometry.test.d.ts +1 -0
  273. package/dist/test/diagram.test.d.ts +1 -0
  274. package/dist/test/erd.test.d.ts +1 -0
  275. package/dist/test/toggle-label.test.d.ts +1 -0
  276. package/dist/test/tree-chart.test.d.ts +1 -0
  277. package/dist/test/workflow-debug.test.d.ts +1 -0
  278. package/dist/test/workflow.test.d.ts +1 -0
  279. package/dist/textarea.js +7 -5
  280. package/dist/textarea.js.map +1 -1
  281. package/dist/time-field.js +6 -6
  282. package/dist/time-picker.js +4 -2
  283. package/dist/time-picker.js.map +1 -1
  284. package/dist/timeline-item.js +2 -2
  285. package/dist/timeline.js +2 -2
  286. package/dist/{toggle-base-BQO5pjrU.js → toggle-base-BlaHalfS.js} +19 -3
  287. package/dist/toggle-base-BlaHalfS.js.map +1 -0
  288. package/dist/tour.js +2 -2
  289. package/dist/transfer-list.js +5 -4
  290. package/dist/transfer-list.js.map +1 -1
  291. package/dist/{chart-base-B-gOg2Di.js → transform-CxeQFXXB.js} +9 -839
  292. package/dist/transform-CxeQFXXB.js.map +1 -0
  293. package/dist/tree-chart.js +1986 -0
  294. package/dist/tree-chart.js.map +1 -0
  295. package/dist/tree-item.js +2 -2
  296. package/dist/tree.js +2 -2
  297. package/dist/tsconfig.tsbuildinfo +1 -1
  298. package/dist/typing-indicator.js +2 -2
  299. package/dist/url-field.js +5 -5
  300. package/dist/user-menu.js +2 -2
  301. package/dist/virtual-list.js +2 -2
  302. package/dist/workflow-format-BsyveyeC.js +34 -0
  303. package/dist/workflow-format-BsyveyeC.js.map +1 -0
  304. package/dist/workflow-model-CauduOG2.js +330 -0
  305. package/dist/workflow-model-CauduOG2.js.map +1 -0
  306. package/dist/workflow-timeline.js +354 -0
  307. package/dist/workflow-timeline.js.map +1 -0
  308. package/dist/workflow.js +3337 -0
  309. package/dist/workflow.js.map +1 -0
  310. package/dist/workspace-switcher.js +2 -2
  311. package/package.json +1 -1
  312. package/readme.md +44 -2
  313. package/src/LoaderUtils.ts +9 -2
  314. package/src/__internal/diagram/canvas-base.ts +410 -0
  315. package/src/__internal/diagram/canvas-link.ts +66 -0
  316. package/src/__internal/diagram/geometry.ts +372 -0
  317. package/src/__internal/diagram/history.ts +49 -0
  318. package/src/__internal/diagram/host.ts +76 -0
  319. package/src/__internal/diagram/markers.ts +56 -0
  320. package/src/__internal/diagram/measure-controller.ts +104 -0
  321. package/src/__internal/diagram/motion.ts +89 -0
  322. package/src/__internal/diagram/selection.ts +69 -0
  323. package/src/__internal/diagram/types.ts +56 -0
  324. package/src/__internal/diagram/viewport-controller.ts +494 -0
  325. package/src/__internal/i18n/strings.ts +201 -0
  326. package/src/__internal/mixins/field.ts +3 -0
  327. package/src/__internal/mixins/form-associated.ts +2 -0
  328. package/src/__internal/mixins/form-submitter.ts +6 -0
  329. package/src/__internal/mixins/hyperlink.ts +10 -0
  330. package/src/__internal/toggle-base.ts +16 -0
  331. package/src/__internal/utils/deprecate.ts +5 -4
  332. package/src/accordion/accordion.ts +1 -0
  333. package/src/button/base-button/base-button.ts +2 -0
  334. package/src/code-editor/code-editor.ts +1 -0
  335. package/src/date-picker/date-picker.ts +2 -0
  336. package/src/dependency-map/dependency-map-layout.ts +505 -0
  337. package/src/dependency-map/dependency-map.scss +626 -0
  338. package/src/dependency-map/dependency-map.ts +1280 -0
  339. package/src/dependency-map/index.ts +16 -0
  340. package/src/diagram/diagram.scss +513 -0
  341. package/src/diagram/diagram.ts +1852 -0
  342. package/src/diagram/flow.ts +81 -0
  343. package/src/diagram/index.ts +44 -0
  344. package/src/diagram-controls/diagram-controls.scss +68 -0
  345. package/src/diagram-controls/diagram-controls.ts +255 -0
  346. package/src/diagram-controls/index.ts +1 -0
  347. package/src/diagram-minimap/diagram-minimap.scss +41 -0
  348. package/src/diagram-minimap/diagram-minimap.ts +149 -0
  349. package/src/diagram-minimap/index.ts +1 -0
  350. package/src/erd/erd-layout.ts +92 -0
  351. package/src/erd/erd.scss +636 -0
  352. package/src/erd/erd.ts +1728 -0
  353. package/src/erd/index.ts +17 -0
  354. package/src/field/field.scss +197 -23
  355. package/src/field/field.ts +109 -16
  356. package/src/file-upload/file-upload.scss +37 -10
  357. package/src/file-upload/file-upload.ts +3 -1
  358. package/src/focus-ring/focus-ring.ts +2 -0
  359. package/src/generative-view/catalog.generated.ts +12 -11
  360. package/src/index.ts +121 -2
  361. package/src/input/BaseField.ts +3 -0
  362. package/src/input/BaseInput.ts +3 -0
  363. package/src/loader.ts +25 -0
  364. package/src/mention-input/mention-input.scss +2 -0
  365. package/src/menu/menu-item/menu-item.ts +1 -0
  366. package/src/number-field/number-field.ts +4 -0
  367. package/src/progress/base-progress.ts +3 -0
  368. package/src/radio/radio-group.ts +1 -0
  369. package/src/radio/radio.ts +1 -1
  370. package/src/rating/rating.ts +1 -0
  371. package/src/ripple/ripple.ts +2 -0
  372. package/src/signature-pad/signature-pad.ts +1 -0
  373. package/src/slider/slider.ts +1 -0
  374. package/src/switch/switch.ts +1 -0
  375. package/src/tabs/tab.ts +2 -0
  376. package/src/tabs/tabs.ts +1 -0
  377. package/src/textarea/textarea.scss +2 -0
  378. package/src/textarea/textarea.ts +1 -0
  379. package/src/time-picker/time-picker.ts +2 -0
  380. package/src/transfer-list/transfer-list.ts +1 -0
  381. package/src/tree-chart/index.ts +13 -0
  382. package/src/tree-chart/tree-chart-layout.ts +185 -0
  383. package/src/tree-chart/tree-chart.scss +377 -0
  384. package/src/tree-chart/tree-chart.ts +1170 -0
  385. package/src/workflow/index.ts +35 -0
  386. package/src/workflow/workflow-format.ts +29 -0
  387. package/src/workflow/workflow-model.ts +583 -0
  388. package/src/workflow/workflow.scss +1164 -0
  389. package/src/workflow/workflow.ts +2674 -0
  390. package/src/workflow-timeline/index.ts +1 -0
  391. package/src/workflow-timeline/workflow-timeline.scss +128 -0
  392. package/src/workflow-timeline/workflow-timeline.ts +238 -0
  393. package/dist/BaseField-CAog9TIc.js.map +0 -1
  394. package/dist/BaseInput-CcMfg1Y2.js.map +0 -1
  395. package/dist/base-button-Do2TUy8M.js.map +0 -1
  396. package/dist/base-progress-BiLlZVHJ.js.map +0 -1
  397. package/dist/cartesian-chart-C-f1frt0.js.map +0 -1
  398. package/dist/chart-base-B-gOg2Di.js.map +0 -1
  399. package/dist/generative-view-DmtpDobn.js.map +0 -1
  400. package/dist/hyperlink-DhE9RlVS.js.map +0 -1
  401. package/dist/src/flow/flow.d.ts +0 -178
  402. package/dist/src/flow/index.d.ts +0 -2
  403. package/dist/toggle-base-BQO5pjrU.js.map +0 -1
  404. package/src/button/button-group/readme.md +0 -23
  405. package/src/flow/flow.scss +0 -215
  406. package/src/flow/flow.ts +0 -958
  407. package/src/flow/index.ts +0 -10
  408. /package/dist/test/{flow.test.d.ts → dependency-map.test.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { _ as __decorate, A, b } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
- import { p as peacockString } from './strings-DmbqMTfs.js';
5
- import { B as BaseInput } from './BaseInput-CcMfg1Y2.js';
4
+ import { p as peacockString } from './strings-BJPuhKJk.js';
5
+ import { B as BaseInput } from './BaseInput-mWdyYv27.js';
6
6
 
7
7
  let fieldCount = 0;
8
8
  /**
@@ -25,14 +25,17 @@ class BaseField extends BaseInput {
25
25
  super(...arguments);
26
26
  /** Label shown above the field; also the control's accessible name. */
27
27
  this.label = '';
28
+ /** Hint shown inside the empty control. */
28
29
  this.placeholder = '';
29
30
  /** Help text shown below the field. */
30
31
  this.helperText = '';
31
32
  /** Shows the field in its error state with `error-text`. */
32
33
  this.error = false;
34
+ /** Error message shown below the field while `error` is set; replaces the help text. */
33
35
  this.errorText = '';
34
36
  /** Shows the field in its warning state with `warning-text`. */
35
37
  this.warning = false;
38
+ /** Warning message shown below the field while `warning` is set; replaces the help text. */
36
39
  this.warningText = '';
37
40
  /** Visual variant of the field. */
38
41
  this.variant = 'default';
@@ -228,4 +231,4 @@ __decorate([
228
231
  ], BaseField.prototype, "focused", void 0);
229
232
 
230
233
  export { BaseField as B };
231
- //# sourceMappingURL=BaseField-CAog9TIc.js.map
234
+ //# sourceMappingURL=BaseField-BMumJpkW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseField-BMumJpkW.js","sources":["../../src/input/BaseField.ts"],"sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { peacockString } from '@/__internal/i18n/strings.js';\nimport type { Size } from '@/__internal/utils/size.js';\nimport BaseInput from './BaseInput.js';\n\n/** What a field component passes to `renderField()`. */\nexport interface FieldRenderOptions {\n /** Whether the field has a value; outlined fields float their label when it does. */\n populated: boolean;\n /** Overrides the field's own focus state, for fields whose popup keeps them active. */\n focused?: boolean;\n /** An error the control found itself, such as text that does not parse. */\n controlError?: string;\n /** Extra content before the control (after the `start` slot). */\n start?: unknown;\n /** Extra content after the control (after the `end` slot), such as a picker button. */\n end?: unknown;\n /** Character counter shown in the footer, such as `12/100`; empty or unset for none. */\n textCount?: string;\n}\n\nlet fieldCount = 0;\n\n/**\n * Base class for Peacock's text-like fields (input, textarea, number, URL, select, date/time,\n * color). It adds the props every field shares (label, helper/error/warning text, variant, size,\n * clearable, `start`/`end` slots) and renders the `wc-field` frame.\n *\n * It also makes the inner control accessible across the shadow boundary: `fieldAria()` gives it\n * an accessible name from `label`, `aria-invalid` while an error shows, and `aria-describedby`\n * pointing at a hidden copy of the helper or error text in the same shadow root.\n *\n * Subclasses call `renderField(control, options)` in `render()`, spread `fieldAria()` onto the\n * native control, call `emitValue('input' | 'change')` instead of re-dispatching native events\n * (the field event contract: `CustomEvent<{ value }>`, bubbling and composed), and override\n * `clearValue()` if clearing means more than `value = ''`.\n */\nexport default abstract class BaseField extends BaseInput {\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** Label shown above the field; also the control's accessible name. */\n @property({ type: String }) label = '';\n\n /** Hint shown inside the empty control. */\n @property({ type: String }) placeholder = '';\n\n /** Help text shown below the field. */\n @property({ type: String, attribute: 'helper-text' }) helperText = '';\n\n /** Shows the field in its error state with `error-text`. */\n @property({ type: Boolean }) error = false;\n\n /** Error message shown below the field while `error` is set; replaces the help text. */\n @property({ type: String, attribute: 'error-text' }) errorText = '';\n\n /** Shows the field in its warning state with `warning-text`. */\n @property({ type: Boolean }) warning = false;\n\n /** Warning message shown below the field while `warning` is set; replaces the help text. */\n @property({ type: String, attribute: 'warning-text' }) warningText = '';\n\n /** Visual variant of the field. */\n @property({ type: String }) variant: 'default' | 'filled' | 'outlined' =\n 'default';\n\n /** Height of the field: `sm` (2.5rem, default), `md` (3.5rem) or `lg` (4rem). */\n @property({ type: String, reflect: true }) size: Size = 'sm';\n\n /** Shows a button that clears the value while the field has one. */\n @property({ type: Boolean }) clearable = false;\n\n /** ARIA attributes moved from the host onto the inner control. */\n @property({ type: Object }) configAria: Record<string, string> = {};\n\n // ── State ────────────────────────────────────────────────────────────────\n\n @state() protected focused = false;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** Id of the hidden description the inner control points at. */\n protected readonly fieldDescriptionId = `wc-field-description-${(fieldCount += 1)}`;\n\n /** A `tabindex` set on the host, moved to the inner control. */\n protected controlTabIndex?: string;\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n override connectedCallback() {\n super.connectedCallback();\n // `aria-*` and `tabindex` set on the host belong to the inner control; move them there.\n for (const attr of Array.from(this.attributes)) {\n if (attr.name.startsWith('aria-')) {\n this.configAria = { ...this.configAria, [attr.name]: attr.value };\n this.removeAttribute(attr.name);\n }\n }\n if (this.hasAttribute('tabindex')) {\n this.controlTabIndex = this.getAttribute('tabindex') ?? undefined;\n this.removeAttribute('tabindex');\n }\n }\n\n // ── Protected ────────────────────────────────────────────────────────────\n\n /**\n * The error text the field shows: the consumer's `error-text` while `error` is set, else an\n * error the control found itself, else the validation message once it should show.\n */\n protected fieldErrorText(controlError = ''): string {\n if (this.error) return this.errorText;\n return controlError || this.validationText;\n }\n\n /**\n * Attributes for the native control: accessible name, invalid state, description and the\n * host's `tabindex`, plus `configAria`. Spread them onto it with `spread(this.fieldAria())`.\n */\n protected fieldAria(controlError = ''): Record<string, string | undefined> {\n const invalid = this.error || !!this.fieldErrorText(controlError);\n return {\n tabindex: this.controlTabIndex,\n 'aria-label': this.label || undefined,\n 'aria-invalid': invalid ? 'true' : undefined,\n 'aria-describedby': this.fieldDescription(controlError)\n ? this.fieldDescriptionId\n : undefined,\n ...this.configAria,\n };\n }\n\n /** Renders the `wc-field` frame around `control`, plus the hidden description. */\n protected renderField(\n control: unknown,\n options: FieldRenderOptions,\n ): TemplateResult {\n const errorText = this.fieldErrorText(options.controlError);\n const description = this.fieldDescription(options.controlError);\n // While a suggestion shows, its reason takes the helper text's place.\n const helperText = this.suggestionReason || this.helperText;\n return html`\n <wc-field\n label=${this.label}\n size=${this.size}\n variant=${this.variant}\n helper-text=${helperText}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?skeleton=${this.skeleton}\n ?error=${this.error || !!errorText}\n error-text=${errorText}\n ?warning=${this.warning}\n warning-text=${this.warningText}\n text-count=${options.textCount ?? ''}\n ?populated=${options.populated}\n ?focused=${options.focused ?? this.focused}\n .host=${this}\n class=\"field\"\n >\n <slot name=\"start\" slot=\"field-start\"></slot>\n ${options.start ?? nothing} ${control}\n <slot name=\"end\" slot=\"field-end\"></slot>\n ${this.suggestionBadge({ slot: 'field-end' })}\n ${this.renderClearButton(options.populated)} ${options.end ?? nothing}\n </wc-field>\n ${description\n ? html`<span id=${this.fieldDescriptionId} hidden>${description}</span>`\n : nothing}\n `;\n }\n\n /** Dispatches `input` or `change` with the current value: the field event contract. */\n protected emitValue(type: 'input' | 'change') {\n this.dispatchEvent(\n new CustomEvent(type, {\n detail: { value: this.value },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n protected override emitSuggestionValue() {\n this.emitValue('input');\n this.emitValue('change');\n }\n\n /** Clears the value for the clear button. Fields with another empty value override it. */\n protected clearValue() {\n this.value = '';\n this.emitValue('input');\n this.emitValue('change');\n }\n\n /** The counter text for a field with a `maxlength`: `12/100`, or '' when there is no limit. */\n protected characterCount(maxLength: number | null | undefined): string {\n if (typeof maxLength !== 'number' || !Number.isFinite(maxLength)) return '';\n if (maxLength < 0) return '';\n const count = String(this.value ?? '').length;\n return peacockString('characterCount')(count, maxLength);\n }\n\n /** Tracks focus of the inner control; bind it to the control's `focus` and `blur`. */\n protected handleFieldFocus = (event: FocusEvent) => {\n this.focused = event.type === 'focus';\n };\n\n // ── Private ──────────────────────────────────────────────────────────────\n\n /** The text the description carries: the error, else the warning, else the help. */\n private fieldDescription(controlError = ''): string {\n const errorText = this.fieldErrorText(controlError);\n if (errorText) return errorText;\n if (this.warning && this.warningText) return this.warningText;\n if (this.suggestionVisible) {\n return peacockString('aiSuggestedDescription')(this.suggestionReason);\n }\n return this.helperText;\n }\n\n private renderClearButton(populated: boolean) {\n if (!this.clearable || !populated || this.disabled || this.readonly) {\n return nothing;\n }\n return html`<wc-icon-button\n slot=\"field-end\"\n class=\"clear-button\"\n shape=\"round\"\n variant=\"text\"\n size=\"sm\"\n aria-label=${peacockString('clear')}\n @click=${() => {\n this.clearValue();\n this.focus();\n }}\n >\n <wc-icon name=\"close\"></wc-icon>\n </wc-icon-button>`;\n }\n}\n"],"names":["html","nothing","property","state"],"mappings":";;;;;;AAuBA,IAAI,UAAU,GAAG,CAAC;AAElB;;;;;;;;;;;;;AAaG;AACW,MAAgB,SAAU,SAAQ,SAAS,CAAA;AAAzD,IAAA,WAAA,GAAA;;;;QAI8B,IAAA,CAAA,KAAK,GAAG,EAAE;;QAGV,IAAA,CAAA,WAAW,GAAG,EAAE;;QAGU,IAAA,CAAA,UAAU,GAAG,EAAE;;QAGxC,IAAA,CAAA,KAAK,GAAG,KAAK;;QAGW,IAAA,CAAA,SAAS,GAAG,EAAE;;QAGtC,IAAA,CAAA,OAAO,GAAG,KAAK;;QAGW,IAAA,CAAA,WAAW,GAAG,EAAE;;QAG3C,IAAA,CAAA,OAAO,GACjC,SAA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A,SAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAIjD,UAAA,CAAA;AAAlB,IAAAC,CAAK;AAA6B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;;;;"}
@@ -2,8 +2,8 @@ import { a as i, b, _ as __decorate } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { m as mixinElementInternals, i as internals } from './element-internals-QME0yEz4.js';
5
- import { m as mixinFormAssociated, g as getFormValue } from './form-associated-D3Tn33s_.js';
6
- import { p as peacockString } from './strings-DmbqMTfs.js';
5
+ import { m as mixinFormAssociated, g as getFormValue } from './form-associated-BHbg72PG.js';
6
+ import { p as peacockString } from './strings-BJPuhKJk.js';
7
7
  import { S as SuggestionController } from './suggestion-controller-CW17adxd.js';
8
8
 
9
9
  const VALIDITY_KEYS = [
@@ -69,8 +69,11 @@ class BaseInput extends mixinFormAssociated(mixinElementInternals(i)) {
69
69
  // ── Lifecycle ────────────────────────────────────────────────────────────
70
70
  constructor() {
71
71
  super();
72
+ /** Shows the value but stops the user changing it; unlike `disabled`, it stays focusable and is submitted. */
72
73
  this.readonly = false;
74
+ /** Requires a value before the form can submit. */
73
75
  this.required = false;
76
+ /** Shows a loading placeholder in place of the control. */
74
77
  this.skeleton = false;
75
78
  /**
76
79
  * Holds data that must never reach a model, such as a salary or a bank account: the control
@@ -295,4 +298,4 @@ __decorate([
295
298
  ], BaseInput.prototype, "showValidity", void 0);
296
299
 
297
300
  export { BaseInput as B, nativeValidity as n };
298
- //# sourceMappingURL=BaseInput-CcMfg1Y2.js.map
301
+ //# sourceMappingURL=BaseInput-mWdyYv27.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInput-mWdyYv27.js","sources":["../../src/input/BaseInput.ts"],"sourcesContent":["import { html, LitElement, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport {\n internals,\n mixinElementInternals,\n} from '@/__internal/mixins/element-internals.js';\nimport {\n type FormRestoreState,\n type FormValue,\n getFormValue,\n mixinFormAssociated,\n} from '@/__internal/mixins/form-associated.js';\nimport { peacockString } from '@/__internal/i18n/strings.js';\nimport {\n SuggestionController,\n type SuggestionAcceptCause,\n} from '@/__internal/ai/suggestion-controller.js';\nimport type { AiSuggestion } from '@/__internal/ai/types.js';\n\nconst VALIDITY_KEYS = [\n 'valueMissing',\n 'typeMismatch',\n 'patternMismatch',\n 'tooLong',\n 'tooShort',\n 'rangeUnderflow',\n 'rangeOverflow',\n 'stepMismatch',\n 'badInput',\n] as const;\n\n/** The flags `ElementInternals.setValidity()` takes, as the DOM's `ValidityStateFlags`. */\nexport type ValidityFlags = {\n [Key in (typeof VALIDITY_KEYS)[number] | 'customError']?: boolean;\n};\n\n/** What a control reports to `ElementInternals.setValidity()`. */\nexport interface ControlValidity {\n flags: ValidityFlags;\n message: string;\n /** Element the browser points at when it reports the problem; defaults to the host. */\n anchor?: HTMLElement;\n}\n\n/** The validity of a native control, for controls that wrap one. */\nexport function nativeValidity(\n control: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement,\n): ControlValidity {\n const flags: ValidityFlags = {};\n for (const key of VALIDITY_KEYS) {\n if (control.validity[key]) flags[key] = true;\n }\n return { flags, message: control.validationMessage, anchor: control };\n}\n\n/** Set while one `invalid` event per form submission moves focus, so only the first one does. */\nlet focusClaimed = false;\n\n/**\n * Base class for Peacock's form controls.\n *\n * It is form-associated: `value` is submitted with the surrounding `<form>`, `form.reset()`\n * restores the value the control started with, and a disabled `<fieldset>` disables it.\n * `name` and `disabled` come from `mixinFormAssociated`; they are backed by attributes, so\n * subclasses must not redeclare them.\n *\n * It takes part in constraint validation like a native control: `required` and the control's own\n * rules (from `computeValidity()`) block form submission, `checkValidity()`, `reportValidity()`,\n * `setCustomValidity()`, `validity` and `validationMessage` work as on `<input>`, and `:invalid`\n * matches. A control shows its message (`validationText`) once the person has committed a value\n * or the form was submitted.\n *\n * It can hold a value the assistant suggested (ADR-030002): `suggestion` fills the control and\n * marks it until the person accepts or clears it. `sensitive` keeps the control out of AI\n * altogether. Subclasses show the marker with `suggestionBadge()` and `suggestionReason`, and\n * override `readSuggestionValue()`, `writeSuggestionValue()` and `emitSuggestionValue()` when\n * their value is not `value` with `input`/`change` events.\n *\n * @fires {CustomEvent<SuggestionAcceptDetail>} accept - Fired when a suggested value is accepted: the person edited it (`cause: 'edit'`), the form was submitted (`'submit'`) or `acceptSuggestion()` was called (`'action'`).\n * @fires {CustomEvent<SuggestionDismissDetail>} dismiss - Fired when the person clears a suggestion, before `input` and `change` with the restored value.\n */\nexport default abstract class BaseInput extends mixinFormAssociated(\n mixinElementInternals(LitElement),\n) {\n // ── Properties ───────────────────────────────────────────────────────────\n\n /** Each control declares its own `value` (a property, or an accessor such as Switch's). */\n abstract value?: any;\n\n /** Shows the value but stops the user changing it; unlike `disabled`, it stays focusable and is submitted. */\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n /** Requires a value before the form can submit. */\n @property({ type: Boolean, reflect: true })\n required: boolean = false;\n\n /** Shows a loading placeholder in place of the control. */\n @property({ type: Boolean, reflect: true })\n skeleton = false;\n\n /**\n * Holds data that must never reach a model, such as a salary or a bank account: the control\n * takes no suggestions and offers no AI features.\n */\n @property({ type: Boolean, reflect: true })\n sensitive = false;\n\n /**\n * A value the assistant suggests, with why. The control takes the value and shows a Suggested\n * badge and the reason until the person edits it, the form is submitted, or the badge clears it,\n * which puts the previous value back. `null` drops the marker and keeps the value. Ignored while\n * AI is off and on `sensitive` controls.\n */\n @property({ attribute: false })\n get suggestion(): AiSuggestion | null {\n return this.__suggestions.suggestion;\n }\n\n set suggestion(suggestion: AiSuggestion | null) {\n const old = this.__suggestions.suggestion;\n this.__suggestions.set(suggestion);\n this.requestUpdate('suggestion', old);\n }\n\n // ── State ────────────────────────────────────────────────────────────────\n\n /** Whether to show the validation message: after a commit, or after a failed submit. */\n @state() protected showValidity = false;\n\n // ── Private fields ───────────────────────────────────────────────────────\n\n /** The value the control had when it was first connected; `form.reset()` returns to it. */\n private __defaultValue: unknown = undefined;\n\n private __defaultValueCaptured = false;\n\n private __customValidity = '';\n\n private readonly __suggestions = new SuggestionController(this, {\n read: () => this.readSuggestionValue(),\n write: value => this.writeSuggestionValue(value),\n emit: () => this.emitSuggestionValue(),\n });\n\n // ── Lifecycle ────────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('invalid', this.__handleInvalid);\n // Every control fires `change` when the person commits a value; from then on, show problems.\n this.addEventListener('change', this.__handleCommit);\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (!this.__defaultValueCaptured) {\n this.__defaultValue = this.value;\n this.__defaultValueCaptured = true;\n }\n }\n\n protected override updated(changed: PropertyValues) {\n super.updated(changed);\n // After render, so a control's inner native input reflects the new value and attributes.\n this.updateValidity();\n }\n\n // ── Public: constraint validation ────────────────────────────────────────\n\n get validity(): ValidityState {\n this.updateValidity();\n return this[internals].validity;\n }\n\n get validationMessage(): string {\n this.updateValidity();\n return this[internals].validationMessage;\n }\n\n get willValidate(): boolean {\n return this[internals].willValidate;\n }\n\n checkValidity(): boolean {\n this.updateValidity();\n return this[internals].checkValidity();\n }\n\n reportValidity(): boolean {\n this.updateValidity();\n return this[internals].reportValidity();\n }\n\n /** Sets a custom error message, as on `<input>`; an empty string clears it. */\n setCustomValidity(message: string): void {\n this.__customValidity = message;\n this.updateValidity();\n this.requestUpdate();\n }\n\n // ── Public: suggestions ──────────────────────────────────────────────────\n\n /** Whether the control holds a suggestion the person hasn't accepted or cleared. */\n get suggested(): boolean {\n return !!this.__suggestions.suggestion;\n }\n\n /** Accepts the suggestion: the value stays and the marker goes. Fires `accept`. */\n acceptSuggestion(cause: SuggestionAcceptCause = 'action'): void {\n this.__suggestions.accept(cause);\n }\n\n /** Clears the suggestion and puts the previous value back. Fires `dismiss`, `input` and `change`. */\n dismissSuggestion(): void {\n this.__suggestions.dismiss();\n }\n\n // ── Protected ────────────────────────────────────────────────────────────\n\n /**\n * The Suggested badge with its clear button, while a suggestion shows; else nothing. Controls\n * without helper text pass `withReason` so the badge's tooltip carries the reason.\n */\n protected suggestionBadge(\n options: { slot?: string; withReason?: boolean } = {},\n ) {\n return this.__suggestions.badge(options);\n }\n\n /**\n * A group's label with the Suggested badge beside it while a suggestion shows. The badge stays\n * outside the label element, so it is not part of the group's accessible name. Style\n * `.label-row` as a row.\n */\n protected labelWithSuggestion(label: unknown) {\n if (!this.suggestionVisible) return label;\n return html`<div class=\"label-row\">${label}${this.suggestionBadge()}</div>`;\n }\n\n /** Why the value was suggested, while the suggestion shows; else `''`. */\n protected get suggestionReason(): string {\n return this.__suggestions.reason;\n }\n\n /** Whether a suggestion shows as one now (AI on, not sensitive). */\n protected get suggestionVisible(): boolean {\n return this.__suggestions.visible;\n }\n\n /** The value a suggestion replaces and a dismissed one restores. */\n protected readSuggestionValue(): unknown {\n return this.value;\n }\n\n /** Puts a suggested or restored value into the control. */\n protected writeSuggestionValue(value: unknown): void {\n this.value = value;\n }\n\n /** Fires `input` and `change` after the person cleared a suggestion. */\n protected emitSuggestionValue(): void {\n for (const type of ['input', 'change']) {\n this.dispatchEvent(\n new CustomEvent(type, {\n detail: { value: this.value },\n bubbles: true,\n composed: true,\n }),\n );\n }\n }\n\n /**\n * The control's own validity. The default checks `required` against an empty `value`;\n * controls that wrap a native input return `nativeValidity(input)`, others add their rules.\n */\n protected computeValidity(): ControlValidity {\n const empty =\n this.value === undefined || this.value === null || this.value === '';\n if (this.required && empty && !this.disabled) {\n return {\n flags: { valueMissing: true },\n message: this.valueMissingText(),\n };\n }\n return { flags: {}, message: '' };\n }\n\n /** The message for a missing required value. */\n protected valueMissingText(): string {\n return peacockString('valueMissing');\n }\n\n /** Pushes the current validity to `ElementInternals`. */\n protected updateValidity(): void {\n if (this.__customValidity) {\n this[internals].setValidity(\n { customError: true },\n this.__customValidity,\n this.validityAnchor(),\n );\n return;\n }\n const { flags, message, anchor } = this.computeValidity();\n const invalid = Object.values(flags).some(Boolean);\n if (invalid) {\n this[internals].setValidity(\n flags,\n message || ' ',\n anchor ?? this.validityAnchor(),\n );\n } else {\n this[internals].setValidity({});\n }\n }\n\n /** The element the browser points at when it reports a problem. */\n protected validityAnchor(): HTMLElement | undefined {\n return undefined;\n }\n\n /** The message to show under the control, or '' while there is nothing to show. */\n protected get validationText(): string {\n if (!this.showValidity) return '';\n this.updateValidity();\n return this[internals].validity.valid\n ? ''\n : this[internals].validationMessage;\n }\n\n // ── Form association ─────────────────────────────────────────────────────\n\n override [getFormValue](): FormValue | null {\n if (this.value === undefined || this.value === null) return null;\n return String(this.value);\n }\n\n formResetCallback() {\n this.__suggestions.set(null);\n this.value = this.__defaultValue;\n this.showValidity = false;\n }\n\n formStateRestoreCallback(restored: FormRestoreState | null) {\n this.value =\n restored === null\n ? this.__defaultValue\n : this.parseRestoreState(restored);\n }\n\n /** Turns saved form state back into a value. Strings by default. */\n protected parseRestoreState(restored: FormRestoreState): unknown {\n return typeof restored === 'string' ? restored : this.__defaultValue;\n }\n\n // ── Private ──────────────────────────────────────────────────────────────\n\n private __handleInvalid = (event: Event) => {\n // Show the message under the control instead of the browser bubble, and move focus to the\n // first invalid control of the submission.\n event.preventDefault();\n this.showValidity = true;\n if (!focusClaimed) {\n focusClaimed = true;\n this.focus();\n queueMicrotask(() => {\n focusClaimed = false;\n });\n }\n };\n\n private __handleCommit = (event: Event) => {\n if (event.target === this) this.showValidity = true;\n };\n}\n"],"names":["LitElement","html","property","state"],"mappings":";;;;;;;;AAoBA,MAAM,aAAa,GAAG;IACpB,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,SAAS;IACT,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,UAAU;CACF;AAeV;AACM,SAAU,cAAc,CAC5B,OAAmE,EAAA;IAEnE,MAAM,KAAK,GAAkB,EAAE;AAC/B,IAAA,KAAK,MAAM,GAAG,IAAI,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src/accordion/accordion.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport styles from './accordion.scss';\nimport { AccordionItem } from './accordion-item.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { RovingFocusController } from '@/__internal/controllers/roving-focus-controller.js';\n\n/**\n * @label Accordion\n * @tag wc-accordion\n * @rawTag accordion\n * @summary A stack of panels whose headers the person opens to show or hide their content.\n * @overview\n * <p>Every panel header is in the Tab order; the Up and Down arrow keys also move focus between\n * the headers, Home and End jump to the first and last. Disabled panels are skipped. Without\n * <code>multiple</code>, opening a panel (by the person or by setting <code>open</code>) closes\n * the others.</p>\n * <p>Items fire <code>open</code> and <code>close</code>.</p>\n *\n * @example\n * ```html\n * <wc-accordion>\n * <wc-accordion-item>\n * <span slot=\"heading\">Panel 1</span>\n * <span slot=\"description\">Summary text</span>\n * Content\n * </wc-accordion-item>\n * <wc-accordion-item>\n * <span slot=\"heading\">Panel 2</span>\n * Content\n * </wc-accordion-item>\n * </wc-accordion>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Accordion extends LitElement {\n // ── Static\n\n static styles = [styles];\n\n static Item = AccordionItem;\n\n // ── Properties\n\n /**\n * Whether multiple panels can be expanded simultaneously.\n * When `false` (default), expanding one panel collapses all others.\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * Variant for the accordion.\n * `'default'` renders panels with a subtle background on expand and dividers between items.\n * `'flat'` renders panels without borders or background changes — suitable for use inside cards.\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'flat' = 'default';\n\n /**\n * When `true`, the toggle icon is placed at the leading start of the header.\n * When `false` (default), the icon is placed at the trailing end.\n */\n @property({ type: Boolean, reflect: true, attribute: 'leading-toggle' })\n leadingToggle = false;\n\n // ── Queries\n\n @queryAssignedElements({ selector: 'wc-accordion-item' })\n items!: Array<AccordionItem>;\n\n // ── Private fields\n\n /** Up/Down, Home and End move focus between the header buttons. */\n private readonly roving = new RovingFocusController(this, {\n items: () =>\n (this.items ?? [])\n .map(item => item.headerButton)\n .filter((button): button is HTMLButtonElement => !!button),\n orientation: () => 'vertical',\n // WAI-ARIA accordion: every header stays in the Tab order; the arrow keys are a shortcut.\n manageTabIndex: () => false,\n });\n\n // ── Lifecycle\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('open', this.__handleItemOpen);\n }\n\n disconnectedCallback() {\n this.removeEventListener('open', this.__handleItemOpen);\n super.disconnectedCallback();\n }\n\n // ── Private\n\n private __handleItemOpen = (event: Event) => {\n const targetItem = event.target as AccordionItem;\n\n // Ignore events from nested accordions — only handle direct children\n if (targetItem.parentElement !== this || this.multiple) return;\n\n for (const item of this.items) {\n if (item !== targetItem && item.open) item.open = false;\n }\n };\n\n private __handleSlotChange = async () => {\n // The header buttons exist once the items have rendered.\n await Promise.all(this.items.map(item => item.updateComplete));\n this.roving.sync();\n };\n\n // ── Render\n\n render() {\n return html`<div\n class=\"accordion\"\n @keydown=${this.roving.handleKeyDown}\n @focusin=${this.roving.handleFocusIn}\n >\n <slot @slotchange=${this.__handleSlotChange}></slot>\n </div>`;\n }\n}\n"],"names":["LitElement","html","styles","property","queryAssignedElements"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;AAAlC,IAAA,WAAA,GAAA;;;;AASL;;;AAGG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEhB;;;;AAIG;QAEH,IAAA,CAAA,OAAO,GAAuB,SAAS;AAEvC;;;AAGG;QAEH,IAAA,CAAA,aAAa,GAAG,KAAK;;;AAUJ,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,qBAAqB,CAAC,IAAI,EAAE;YACxD,KAAK,EAAE,MACL,CAAC,IAAI,CAAC,KAAK,I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wBAAA,EAAA,IAAI,CAAC,kBAAkB,CAAA;WACtC;IACT;;AAvFO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAEjB,SAAA,CAAA,IAAI,GAAG,aAAH;AASX,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAQjB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAOxC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAKtB,UAAA,CAAA;AADC,IAAAC,CAAqB,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE;AAC3B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAlClB,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CA2FrB;;;;"}
1
+ {"version":3,"file":"accordion.js","sources":["../../src/accordion/accordion.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, queryAssignedElements } from 'lit/decorators.js';\nimport styles from './accordion.scss';\nimport { AccordionItem } from './accordion-item.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { RovingFocusController } from '@/__internal/controllers/roving-focus-controller.js';\n\n/**\n * @label Accordion\n * @tag wc-accordion\n * @rawTag accordion\n * @summary A stack of panels whose headers the person opens to show or hide their content.\n * @overview\n * <p>Every panel header is in the Tab order; the Up and Down arrow keys also move focus between\n * the headers, Home and End jump to the first and last. Disabled panels are skipped. Without\n * <code>multiple</code>, opening a panel (by the person or by setting <code>open</code>) closes\n * the others.</p>\n * <p>Items fire <code>open</code> and <code>close</code>.</p>\n *\n * @example\n * ```html\n * <wc-accordion>\n * <wc-accordion-item>\n * <span slot=\"heading\">Panel 1</span>\n * <span slot=\"description\">Summary text</span>\n * Content\n * </wc-accordion-item>\n * <wc-accordion-item>\n * <span slot=\"heading\">Panel 2</span>\n * Content\n * </wc-accordion-item>\n * </wc-accordion>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Accordion extends LitElement {\n // ── Static\n\n static styles = [styles];\n\n static Item = AccordionItem;\n\n // ── Properties\n\n /**\n * Whether multiple panels can be expanded simultaneously.\n * When `false` (default), expanding one panel collapses all others.\n */\n @property({ type: Boolean, reflect: true })\n multiple = false;\n\n /**\n * Variant for the accordion.\n * `'default'` renders panels with a subtle background on expand and dividers between items.\n * `'flat'` renders panels without borders or background changes — suitable for use inside cards.\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'flat' = 'default';\n\n /**\n * When `true`, the toggle icon is placed at the leading start of the header.\n * When `false` (default), the icon is placed at the trailing end.\n */\n @property({ type: Boolean, reflect: true, attribute: 'leading-toggle' })\n leadingToggle = false;\n\n // ── Queries\n\n /** The `wc-accordion-item` children slotted into the accordion. */\n @queryAssignedElements({ selector: 'wc-accordion-item' })\n items!: Array<AccordionItem>;\n\n // ── Private fields\n\n /** Up/Down, Home and End move focus between the header buttons. */\n private readonly roving = new RovingFocusController(this, {\n items: () =>\n (this.items ?? [])\n .map(item => item.headerButton)\n .filter((button): button is HTMLButtonElement => !!button),\n orientation: () => 'vertical',\n // WAI-ARIA accordion: every header stays in the Tab order; the arrow keys are a shortcut.\n manageTabIndex: () => false,\n });\n\n // ── Lifecycle\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('open', this.__handleItemOpen);\n }\n\n disconnectedCallback() {\n this.removeEventListener('open', this.__handleItemOpen);\n super.disconnectedCallback();\n }\n\n // ── Private\n\n private __handleItemOpen = (event: Event) => {\n const targetItem = event.target as AccordionItem;\n\n // Ignore events from nested accordions — only handle direct children\n if (targetItem.parentElement !== this || this.multiple) return;\n\n for (const item of this.items) {\n if (item !== targetItem && item.open) item.open = false;\n }\n };\n\n private __handleSlotChange = async () => {\n // The header buttons exist once the items have rendered.\n await Promise.all(this.items.map(item => item.updateComplete));\n this.roving.sync();\n };\n\n // ── Render\n\n render() {\n return html`<div\n class=\"accordion\"\n @keydown=${this.roving.handleKeyDown}\n @focusin=${this.roving.handleFocusIn}\n >\n <slot @slotchange=${this.__handleSlotChange}></slot>\n </div>`;\n }\n}\n"],"names":["LitElement","html","styles","property","queryAssignedElements"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;AAAlC,IAAA,WAAA,GAAA;;;;AASL;;;AAGG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEhB;;;;AAIG;QAEH,IAAA,CAAA,OAAO,GAAuB,SAAS;AAEvC;;;AAGG;QAEH,IAAA,CAAA,aAAa,GAAG,KAAK;;;AAWJ,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,qBAAqB,CAAC,IAAI,EAAE;YACxD,KAAK,EAAE,MACL,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;iBACd,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY;iBAC7B,MAAM,CAAC,CAAC,MAAM,KAAkC,CAAC,CAAC,MAAM,CAAC;AAC9D,YAAA,WAAW,EAAE,MAAM,UAAU;;AAE7B,YAAA,cAAc,EAAE,MAAM,KAAK;AAC5B,SAAA,CAAC;;AAgBM,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAC,KAAY,KAAI;AAC1C,YAAA,MAAM,UAAU,GA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AA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAOxC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAMtB,UAAA,CAAA;AADC,IAAAC,CAAqB,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE;AAC3B,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAnClB,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CA4FrB;;;;"}
package/dist/ai-badge.js CHANGED
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { A as AiController } from './ai-controller-DR_Tg0sN.js';
4
4
  import { s as sparkle } from './sparkle-BmtM0vbq.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './locale-DEsJZCQG.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
 
9
9
  var css_248z = i`* {
10
10
  box-sizing: border-box;
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b, A } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { A as AiController } from './ai-controller-DR_Tg0sN.js';
4
4
  import { s as sparkle } from './sparkle-BmtM0vbq.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './locale-DEsJZCQG.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
 
9
9
  var css_248z = i`* {
10
10
  box-sizing: border-box;
package/dist/alert.js CHANGED
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './class-map-NDIkZErE.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './directive-ZPhl09Yt.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
  import './locale-DEsJZCQG.js';
9
9
 
10
10
  var css_248z = i`* {
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './class-map-NDIkZErE.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './directive-ZPhl09Yt.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
  import './locale-DEsJZCQG.js';
9
9
 
10
10
  var css_248z = i`* {
package/dist/app-shell.js CHANGED
@@ -3,11 +3,11 @@ import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
6
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
7
7
  import { O as OverlayController } from './overlay-controller-BOk-kfil.js';
8
8
  import './base-Cl6v8-BZ.js';
9
9
  import './directive-ZPhl09Yt.js';
10
- import './strings-DmbqMTfs.js';
10
+ import './strings-BJPuhKJk.js';
11
11
  import './locale-DEsJZCQG.js';
12
12
 
13
13
  var css_248z = i`* {
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { A as AiController } from './ai-controller-DR_Tg0sN.js';
4
4
  import { s as sparkle } from './sparkle-BmtM0vbq.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './locale-DEsJZCQG.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
 
9
9
  var css_248z = i`* {
10
10
  box-sizing: border-box;
@@ -1,7 +1,7 @@
1
1
  import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
4
- import './strings-DmbqMTfs.js';
3
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
4
+ import './strings-BJPuhKJk.js';
5
5
  import './locale-DEsJZCQG.js';
6
6
 
7
7
  var css_248z = i`* {
@@ -2,10 +2,10 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { A as AiController } from './ai-controller-DR_Tg0sN.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import { STEP_STATUS } from './assistant-step.js';
7
7
  import './locale-DEsJZCQG.js';
8
- import './strings-DmbqMTfs.js';
8
+ import './strings-BJPuhKJk.js';
9
9
 
10
10
  var css_248z = i`* {
11
11
  box-sizing: border-box;
@@ -2,9 +2,9 @@ import { i, a as i$1, _ as __decorate, I as IndividualComponent, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './base-Cl6v8-BZ.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
  import './locale-DEsJZCQG.js';
9
9
 
10
10
  var css_248z = i`* {
package/dist/banner.js CHANGED
@@ -2,9 +2,9 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './class-map-NDIkZErE.js';
5
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
5
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
6
6
  import './directive-ZPhl09Yt.js';
7
- import './strings-DmbqMTfs.js';
7
+ import './strings-BJPuhKJk.js';
8
8
  import './locale-DEsJZCQG.js';
9
9
 
10
10
  var css_248z = i`* {
@@ -7,7 +7,9 @@ function mixinBaseButton(base) {
7
7
  class BaseButtonElement extends base {
8
8
  constructor() {
9
9
  super(...arguments);
10
+ /** The visual style of the button, such as `"filled"`, `"tonal"`, `"outlined"` or `"text"`. */
10
11
  this.variant = '';
12
+ /** The color role of the button, such as `"primary"`, `"surface"` or `"danger"`. */
11
13
  this.color = '';
12
14
  /**
13
15
  * When `true`, the button is disabled and cannot be interacted with. Reflects to the `disabled` attribute. Defaults to `false`.
@@ -171,4 +173,4 @@ function warnIfUnnamed(host, ariaLabel, ...otherNames) {
171
173
  }
172
174
 
173
175
  export { mixinBaseButton as a, iconButtonLabel as i, mixinButtonLevel as m, toggleButtonSelected as t, warnIfUnnamed as w };
174
- //# sourceMappingURL=base-button-Do2TUy8M.js.map
176
+ //# sourceMappingURL=base-button-BJMGMcMv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-button-BJMGMcMv.js","sources":["../../src/button/base-button/base-button.ts"],"sourcesContent":["import { LitElement, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { WithElementInternals } from '@/__internal/mixins/element-internals.js';\nimport { throttle } from '@/__internal/utils/throttle.js';\nimport { warnOnce } from '@/__internal/utils/warn-once.js';\nimport { MixinBase, MixinReturn } from '@/__internal/mixins/mixin.js';\nimport type {\n ButtonColor,\n ButtonLevel,\n ButtonVariant,\n} from '@/button/ButtonTypes.js';\n\n/**\n * 1. Define an interface for the members the mixin adds.\n * This makes the type annotation much cleaner.\n */\nexport interface BaseButton {\n variant: string;\n\n color: string;\n\n disabled: boolean;\n\n softDisabled: boolean;\n\n disabledReason: string;\n\n throttleDelay?: number;\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;\n\n __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;\n}\n\nexport function mixinBaseButton<\n T extends MixinBase<LitElement & WithElementInternals>,\n>(base: T): MixinReturn<T, BaseButton> {\n abstract class BaseButtonElement extends base implements BaseButton {\n /** The visual style of the button, such as `\"filled\"`, `\"tonal\"`, `\"outlined\"` or `\"text\"`. */\n @property({ type: String, reflect: true })\n variant: string = '';\n\n /** The color role of the button, such as `\"primary\"`, `\"surface\"` or `\"danger\"`. */\n @property({ type: String, reflect: true })\n color: string = '';\n\n /**\n * When `true`, the button is disabled and cannot be interacted with. Reflects to the `disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n /**\n * When `true`, the button is visually styled as disabled and cannot be interacted with, but remains focusable.\n * Use this in combination with `disabledReason` to communicate why the button is unavailable.\n * Reflects to the `soft-disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'soft-disabled' })\n softDisabled: boolean = false;\n\n /**\n * A human-readable explanation of why the button is disabled or soft-disabled.\n * Rendered as a visually hidden tooltip and linked via `aria-describedby` for accessibility.\n * Maps to the `disabled-reason` attribute.\n */\n @property({ attribute: 'disabled-reason' })\n disabledReason: string = '';\n\n /**\n * Sets the delay for throttle in milliseconds. When undefined (default), no throttle is applied.\n */\n @property({ type: Number, attribute: 'throttle-delay' })\n throttleDelay?: number;\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =\n event => {\n this.__dispatchClick(event);\n };\n\n abstract __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;\n\n override firstUpdated(changedProperties: PropertyValues) {\n super.firstUpdated(changedProperties);\n if (typeof this.throttleDelay === 'number') {\n this.__dispatchClickWithThrottle = throttle(\n this.__dispatchClick,\n this.throttleDelay,\n );\n }\n }\n }\n\n return BaseButtonElement;\n}\n\n// ── Level ────────────────────────────────────────────────────────────────────\n\n/**\n * What each `level` preset resolves to, shared by `wc-button`, `wc-icon-button` and\n * `wc-link-button`. A `color` or `variant` the consumer sets wins over the preset, one property at\n * a time, so `level=\"danger\" variant=\"outlined\"` is an outlined danger button.\n */\nexport const BUTTON_LEVEL_APPEARANCE: Readonly<\n Record<\n ButtonLevel,\n { readonly color: ButtonColor; readonly variant: ButtonVariant }\n >\n> = {\n primary: { color: 'primary', variant: 'filled' },\n secondary: { color: 'surface', variant: 'tonal' },\n tertiary: { color: 'primary', variant: 'text' },\n danger: { color: 'danger', variant: 'filled' },\n};\n\n/** Variant and color used when neither the consumer nor a `level` sets one. */\nexport const BUTTON_DEFAULT_APPEARANCE = {\n color: 'primary',\n variant: 'filled',\n} as const satisfies { color: ButtonColor; variant: ButtonVariant };\n\n/** The preset for `level`, or `undefined` for no level or an unknown one. */\nexport function levelAppearance(\n level: string | undefined | null,\n):\n | { readonly color: ButtonColor; readonly variant: ButtonVariant }\n | undefined {\n if (\n !level ||\n !Object.prototype.hasOwnProperty.call(BUTTON_LEVEL_APPEARANCE, level)\n )\n return undefined;\n return BUTTON_LEVEL_APPEARANCE[level as ButtonLevel];\n}\n\n/** The members `mixinButtonLevel` adds. */\nexport interface ButtonLevelAppearance {\n /**\n * Preset of `color` and `variant`: `primary` (primary, filled), `secondary` (surface, tonal),\n * `tertiary` (primary, text), `danger` (danger, filled). A `color` or `variant` set on the\n * element wins over the preset.\n */\n level?: ButtonLevel;\n\n /** The visual style. Reads back the resolved value: the one set, else the level's, else `filled`. */\n variant: ButtonVariant;\n\n /** The color role. Reads back the resolved value: the one set, else the level's, else `primary`. */\n color: ButtonColor;\n}\n\n/**\n * Adds `level` and resolves `variant` and `color` from it at render time. The `variant` and\n * `color` attributes reflect the resolved values (the styles key on them), but the level never\n * writes the consumer's own values, so a later change to `level` takes effect and an explicit\n * `color`/`variant` always wins.\n */\nexport function mixinButtonLevel<T extends MixinBase<LitElement & BaseButton>>(\n base: T,\n): MixinReturn<T, ButtonLevelAppearance> {\n abstract class ButtonLevelElement\n extends base\n implements ButtonLevelAppearance\n {\n /**\n * Preset of `color` and `variant`: `primary` (primary, filled), `secondary` (surface, tonal),\n * `tertiary` (primary, text), `danger` (danger, filled). A `color` or `variant` set on the\n * element wins over the preset.\n */\n @property({ type: String }) level?: ButtonLevel;\n\n /**\n * The visual style of the button: `\"filled\"`, `\"tonal\"`, `\"outlined\"`, `\"text\"`,\n * `\"elevated\"` or `\"neo\"`. Unset, it comes from `level`, else `\"filled\"`.\n */\n @property({ type: String, reflect: true })\n get variant(): ButtonVariant {\n return (\n this.__explicitVariant ||\n levelAppearance(this.level)?.variant ||\n BUTTON_DEFAULT_APPEARANCE.variant\n );\n }\n\n set variant(value: ButtonVariant) {\n this.__explicitVariant = value || undefined;\n }\n\n /**\n * The color role of the button. Unset, it comes from `level`, else `\"primary\"`.\n */\n @property({ type: String, reflect: true })\n get color(): ButtonColor {\n return (\n this.__explicitColor ||\n levelAppearance(this.level)?.color ||\n BUTTON_DEFAULT_APPEARANCE.color\n );\n }\n\n set color(value: ButtonColor) {\n this.__explicitColor = value || undefined;\n }\n\n __explicitVariant?: ButtonVariant;\n\n __explicitColor?: ButtonColor;\n\n override willUpdate(changedProperties: PropertyValues) {\n super.willUpdate(changedProperties);\n // The level changes the resolved values without going through their setters, so ask Lit\n // to reflect them (also on the first update, when nothing has set them yet).\n if (!this.hasUpdated || changedProperties.has('level')) {\n this.requestUpdate('variant', undefined);\n this.requestUpdate('color', undefined);\n }\n }\n }\n\n return ButtonLevelElement;\n}\n\n// ── Toggle ───────────────────────────────────────────────────────────────────\n\n/** A button that can act as a toggle: `toggle` turns it on, `selected` is its pressed state. */\nexport interface ToggleableButton extends HTMLElement {\n toggle: boolean;\n selected: boolean;\n disabled: boolean;\n}\n\n/**\n * Flips `selected` on a toggle button and fires `change` with the new state. Does nothing unless\n * `toggle` is set or while the button is disabled; callers block soft-disabled and loading first.\n */\nexport function toggleButtonSelected(host: ToggleableButton): void {\n if (!host.toggle || host.disabled) return;\n host.selected = !host.selected;\n host.dispatchEvent(\n new CustomEvent<{ selected: boolean }>('change', {\n detail: { selected: host.selected },\n bubbles: true,\n composed: true,\n }),\n );\n}\n\n// ── Accessible name ──────────────────────────────────────────────────────────\n\n/**\n * The name an icon-only button falls back to: its `aria-label`, else its tooltip text.\n */\nexport function iconButtonLabel(\n ariaLabel: string | null | undefined,\n tooltip: string | undefined,\n): string | undefined {\n return ariaLabel || tooltip || undefined;\n}\n\n/**\n * Warns once per tag when an icon-only button has nothing to be announced by: no `aria-label`,\n * no `aria-labelledby`, no `tooltip` and no slotted text.\n */\nexport function warnIfUnnamed(\n host: HTMLElement,\n ariaLabel: string | null | undefined,\n ...otherNames: (string | null | undefined)[]\n): void {\n if (ariaLabel || otherNames.some(name => !!name)) return;\n if (host.hasAttribute('aria-labelledby')) return;\n if (host.hasAttribute('data-aria-labelledby')) return;\n if (host.textContent?.trim()) return;\n const tag = host.localName;\n warnOnce(\n `${tag}:accessible-name`,\n `[peacock] ${tag} has no accessible name, so screen readers announce it as just \"button\". Give it an aria-label or a tooltip.`,\n );\n}\n"],"names":["property"],"mappings":";;;;;AAkCM,SAAU,eAAe,CAE7B,IAAO,EAAA;IACP,MAAe,iBAAkB,SAAQ,IAAI,CAAA;AAA7C,QAAA,WAAA,GAAA;;;YAGE,IAA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{ a as i, _ as __decorate } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
3
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
4
4
  import { m as mixinDelegatesAria } from './delegate-Bw2wdPFP.js';
5
5
 
6
6
  /**
@@ -12,7 +12,9 @@ class BaseProgress extends mixinDelegatesAria(i) {
12
12
  super(...arguments);
13
13
  /** The value at which the task is complete. Defaults to `100`. */
14
14
  this.max = 100;
15
+ /** Shows ongoing activity with no known completion, ignoring `value`. */
15
16
  this.indeterminate = false;
17
+ /** Lays out the label and the indicator on one line instead of stacking them. */
16
18
  this.inline = false;
17
19
  /** Peacock's strings, for the fallback accessible name. */
18
20
  this.i18n = new I18nController(this);
@@ -57,4 +59,4 @@ __decorate([
57
59
  ], BaseProgress.prototype, "inline", void 0);
58
60
 
59
61
  export { BaseProgress as B };
60
- //# sourceMappingURL=base-progress-BiLlZVHJ.js.map
62
+ //# sourceMappingURL=base-progress-CvLVSjuy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-progress-CvLVSjuy.js","sources":["../../src/progress/base-progress.ts"],"sourcesContent":["import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { I18nController } from '@/__internal/i18n/i18n-controller.js';\nimport { mixinDelegatesAria } from '@/__internal/aria/delegate.js';\nimport type { ARIAMixinStrict } from '@/__internal/aria/aria.js';\n\n/**\n * `aria-label` on the host names the progress bar without a visible label (it moves to the inner\n * `role=\"progressbar\"` element, as on buttons).\n */\nexport class BaseProgress extends mixinDelegatesAria(LitElement) {\n /** The current value, clamped into `0`–`max`. */\n @property({ type: Number }) value?: number;\n\n /** The value at which the task is complete. Defaults to `100`. */\n @property({ type: Number }) max = 100;\n\n /** Shows ongoing activity with no known completion, ignoring `value`. */\n @property({ type: Boolean }) indeterminate = false;\n\n /**\n * A visible label describing the progress, which also names the progress bar\n * (`aria-labelledby`). Without one the bar is named \"Loading\" (string `loading`).\n */\n @property({ type: String }) label?: string;\n\n /** Help text shown below the progress indicator. */\n @property({ type: String, attribute: 'helper-text' }) helperText?: string;\n\n /** Lays out the label and the indicator on one line instead of stacking them. */\n @property({ type: Boolean }) inline = false;\n\n /** Peacock's strings, for the fallback accessible name. */\n protected readonly i18n = new I18nController(this);\n\n /** The bar's name without a visible `label`: the host's `aria-label`, else \"Loading\". */\n protected get __fallbackLabel(): string {\n return (this as ARIAMixinStrict).ariaLabel || this.i18n.t('loading');\n }\n\n /** `max`, or 100 when it is not a positive number. */\n protected get __max(): number {\n return Number.isFinite(this.max) && this.max > 0 ? this.max : 100;\n }\n\n /** `value` clamped into `0`–`max`; 0 when unset. */\n protected get __clampedValue(): number {\n const value = Number(this.value);\n if (!Number.isFinite(value)) return 0;\n return Math.min(this.__max, Math.max(0, value));\n }\n\n /** The clamped value as a percentage of `max`. */\n __getPercentageValue(): number {\n return (this.__clampedValue / this.__max) * 100;\n }\n}\n"],"names":["LitElement","property"],"mappings":";;;;;AAMA;;;AAGG;MACU,YAAa,SAAQ,kBAAkB,CAACA,CAAU,CAAC,CAAA;AAAhE,IAAA,WAAA,GAAA;;;QAK8B,IAAA,CAAA,GAAG,GAAG,GAAG;;QAGR,IAAA,CAAA,aAAa,GAAG,KAAK;;QAYrB,IAAA,CAAA,MAAM,GAAG,KAAK;;AAGxB,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC;IAuBpD;;AApBE,IAAA,IAAc,eAAe,GAAA;AAC3B,QAAA,OAAQ,IAAwB,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE;;AAGA,IAAA,IAAc,KAAK,GAAA;QACjB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG;IACnE;;AAGA,IA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AAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;;;;"}
@@ -4,11 +4,11 @@ import { r } from './state-BCeDVCI9.js';
4
4
  import { e } from './query-CHb9Ft_d.js';
5
5
  import { e as e$1 } from './class-map-NDIkZErE.js';
6
6
  import { o } from './style-map-CHOg6N_R.js';
7
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
7
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
8
8
  import { O as OverlayController } from './overlay-controller-BOk-kfil.js';
9
9
  import './base-Cl6v8-BZ.js';
10
10
  import './directive-ZPhl09Yt.js';
11
- import './strings-DmbqMTfs.js';
11
+ import './strings-BJPuhKJk.js';
12
12
  import './locale-DEsJZCQG.js';
13
13
 
14
14
  var css_248z = i`* {
@@ -1,12 +1,12 @@
1
1
  import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './IndividualComponent-BK7XZjE2.js';
2
2
  import { n } from './property-B2TG3KEE.js';
3
3
  import { BreadcrumbItem } from './breadcrumb-item.js';
4
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
4
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
5
5
  import './state-BCeDVCI9.js';
6
6
  import './class-map-NDIkZErE.js';
7
7
  import './directive-ZPhl09Yt.js';
8
8
  import './if-defined-D9DEJR_6.js';
9
- import './strings-DmbqMTfs.js';
9
+ import './strings-BJPuhKJk.js';
10
10
  import './locale-DEsJZCQG.js';
11
11
 
12
12
  var css_248z = i`* {
@@ -12,13 +12,13 @@ import './observe-slot-change-DPxaZrZF.js';
12
12
  import './throttle-SQ9t-HL7.js';
13
13
  import './ButtonConstants-CahP2_NA.js';
14
14
  import './delegate-Bw2wdPFP.js';
15
- import './form-submitter-DWwv6K9-.js';
15
+ import './form-submitter-beG1CXAn.js';
16
16
  import './element-internals-QME0yEz4.js';
17
- import './base-button-Do2TUy8M.js';
17
+ import './base-button-BJMGMcMv.js';
18
18
  import './warn-once-BNxX1Y98.js';
19
- import './form-associated-D3Tn33s_.js';
19
+ import './form-associated-BHbg72PG.js';
20
20
  import './is-link-Dk2OV3PM.js';
21
- import './hyperlink-DhE9RlVS.js';
21
+ import './hyperlink-DycWPKwU.js';
22
22
 
23
23
  var css_248z = i`* {
24
24
  box-sizing: border-box;
package/dist/button.js CHANGED
@@ -8,10 +8,10 @@ import { o as observerSlotChangesWithCallback } from './observe-slot-change-DPxa
8
8
  import { i as isActivationClick, d as dispatchActivationClick } from './throttle-SQ9t-HL7.js';
9
9
  import { D as DISABLED_REASON_ID } from './ButtonConstants-CahP2_NA.js';
10
10
  import { m as mixinDelegatesAria } from './delegate-Bw2wdPFP.js';
11
- import { m as mixinFormSubmitter } from './form-submitter-DWwv6K9-.js';
11
+ import { m as mixinFormSubmitter } from './form-submitter-beG1CXAn.js';
12
12
  import { m as mixinElementInternals } from './element-internals-QME0yEz4.js';
13
- import { m as mixinButtonLevel, a as mixinBaseButton, t as toggleButtonSelected } from './base-button-Do2TUy8M.js';
14
- import { m as mixinFormAssociated } from './form-associated-D3Tn33s_.js';
13
+ import { m as mixinButtonLevel, a as mixinBaseButton, t as toggleButtonSelected } from './base-button-BJMGMcMv.js';
14
+ import { m as mixinFormAssociated } from './form-associated-BHbg72PG.js';
15
15
  import './base-Cl6v8-BZ.js';
16
16
  import './directive-ZPhl09Yt.js';
17
17
  import './warn-once-BNxX1Y98.js';
package/dist/calendar.js CHANGED
@@ -3,10 +3,10 @@ import { n } from './property-B2TG3KEE.js';
3
3
  import { r } from './state-BCeDVCI9.js';
4
4
  import { t as toZonedWallClock, a as addDays, b as addMonths, f as formatDate } from './utils-D92ldd1V.js';
5
5
  import { C as CalendarEvent } from './calendar-event-_OYdAT3c.js';
6
- import { I as I18nController } from './i18n-controller-urcQKYGe.js';
6
+ import { I as I18nController } from './i18n-controller-Cp43HjJl.js';
7
7
  import { A as isoToDate, B as dateToIso, w as weekStart } from './date-vFrYT1S9.js';
8
8
  import './locale-DEsJZCQG.js';
9
- import './strings-DmbqMTfs.js';
9
+ import './strings-BJPuhKJk.js';
10
10
 
11
11
  var css_248z = i`* {
12
12
  box-sizing: border-box;